OK, my site will feature a content-type that will hold a Flash-based slideshow...but I'm not able to get what I want using the CCK, Image, and Content Templates
This is essentially what I want...each Flash Slideshow node contains:
A title
Taxonomy terms
A static image that represents the slideshow...this is displayed in the teaser and list views
Three input fields, for the height, width, and file location of the Flash file
The body text field to hold a description.
The teaser view would show the node's image-preview size, headline, and taxonomy terms...The full view would output the necessary HTML code (reading from height, weight, and file location) needed to embed the Flash object.
I thought I could do this fairly easy by creating a custom content type with an attached image...but one thing I can't figure right off the block is how, using content template, get the teaser view to show the preview-size of an image and the body text. I can't find the variables that holds just the image, for example (instead, I've only found the content field which, of course, holds all the body field data).
Just want to know, is CCK, Image, and Content Templates all I need to do what I want? Are they adequate?
Comments
devel module is your friend
I use the devel module whenever I am theming node types. The devel load tab on each node will show you the available node fields.
--
Digett
Some other ideas...
There's a slideshow module for Slideshow Pro, which has a license fee, but it follows the right principles. You should have a look at the module's code and see how it does its magic. I haven't had a look at it myself, but I certainly will!
If you want to have a good lesson in problem-solving, a Flash slideshow is a fine exercise. For my last project I embedded the Mono Slideshow, but my custom module code was tied specifically to the content types of that site, and it was nothing you'd distribute in a module.
The simplest way of making a Flash slideshow is to find an existing one that can take an RSS feed as its input (those that take a custom xml file require a little bit more work). Then all you have to do is create a View that outputs RSS and use the Content Templates module to customize the RSS output for each node.
The next thing to do is to implement a custom view type in your module. The Calendar module is a great example of all the hooks you need to implement. It demonstrates how to create a page view and a block view and how to tie these into the theme system. I believe the Slideshow Pro module does most of this stuff too, though perhaps not in the same manner I'm advocating here.
Once you have your slideshow module built, you can add a slideshow to any area of your site just by creating a new view. When you implement a view you set up the filters to select just the nodes you want to include, set the view type to Slideshow, check off Page or Block. Make sure to add the RSS Feed Selector to your arguments (your module can perhaps make this always enabled). This will allow your slideshow pages and blocks to use myslideshowpage/feed as their input sources. And for your Field settings include the CCK field that contains your image. You might be able to use the attachment field as well.
It would obviously be most efficient to have your input source be a static XML file. That's what my Mono Slideshow stuff did. It just hooked into the node editing operations and when the relevant content types were being modified it would generate a new XML file. I can imagine a few different ways to implement this kind of thing, but it's not as elegant as the Views solution. Perhaps someone knows of a way to smartly cache the relevant views' RSS feeds so there doesn't have to be a database hit on every visit to a slideshow.
Slideshow Pro also implements a [tag] you can embed in text fields. It takes the "name" of the slideshow as its input. Presumably your slideshows are defined with parameters like size and color, so they can be displayed in customized ways in the output.
In a views-based solution you might be able to use this scheme by referring to the name of the view, and the "view" would be given some additional parameter to behave differently as an inline object. Or parameters could be specified right in the tag, which is less than elegant when you need a lot of variation.
Since most slideshows have configuration parameters, you need some way to define default and custom parameters. You could provide a back-end interface for this, listing all the views of type "slideshow" and laying out the slideshow parameters. This would be simplest to implement, I imagine, but suffers from the fact that you don't get an interface to all your views parameters and slideshow parameters in one place. But for most sites, a single set of default block parameters (matching your sidebar colors) and default page parameters will probably suffice.
Making modules can be a lot of fun, but choosing the right approach can be tough. I hope this helps out anyone thinking of supporting Flash slideshows and such... to take advantage of what Drupal has already to offer.
Office 2007 License
zb operating system,Microsoft Office 2007 activation machine type system image,Windows 7 Product Key, including data,Windows 7 Ultimate, applications and operation system. The File Rescue utility can help retrieve files that were not backed up prior to the problem and save them to a storage device. The backup and recovery function, now more efficient,Office Ultimate 2007, requires less hard drive space than the previous version and supports a broad range of external devices for recovering information,Microsoft Office 2007 Key, including CD,Microsoft Office 2010 activation network, second hard drive and Office 2010 Sale video or other large files.
Office 2007 License
zb operating system,Microsoft Office 2007 activation machine type system image,Windows 7 Product Key, including data,Windows 7 Ultimate, applications and operation system. The File Rescue utility can help retrieve files that were not backed up prior to the problem and save them to a storage device. The backup and recovery function, now more efficient,Office Ultimate 2007, requires less hard drive space than the previous version and supports a broad range of external devices for recovering information,Microsoft Office 2007 Key, including CD,Microsoft Office 2010 activation network, second hard drive and Office 2010 Sale video or other large file